package com.demo.controller;

import com.demo.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * @author krystal
 * @date 2023/3/6 22:26
 */
@Controller
public class UserController {
    @Autowired
    private User user1;

    public void getUser(){
        System.out.println("user1:"+user1);
        User u=user1;
        u.setName("边伯贤");
        System.out.println("u:"+u);
    }
}
